In the year of 1742 C. Goldbach wrote in his letter to L. Euler that according to him each integer
was the sum of three prime numbers (a prime number is an integer
, which has only two positive, integer divisors:
and
.). Euler answered, that Golbach's statement was equal to the one, that each even number
was the sum of two prime numbers. However, it did not make them any closer to the solution of the basic problem: is it really so? At the present we know that this statement is true for numbers up to
(and we know much more, but this hypothesis is still an open problem). We are not about to verify that, but we will try to solve a less ambitious problem. Each integer
is the sum of different odd prime numbers.
Write a program which:
In the first line of the standard input there is one positive integer
,
. In each of the following
lines there is one integer from the interval
.
Decomposition of the number
has to be written in two lines. In the first line one integer
should be written, this is the number of addends of the decomposition. In the second line
different odd numbers should be written in ascending order. Their sum should be equal to
, and they should be separated by single spaces. The decompositions should appear in the same order as the integers in the input file.
For the input data:
2 59 15
the correct result is:
5 5 7 11 17 19 3 3 5 7
Task author: Wojciech Guzicki.
W razie problemów technicznych ze Szkopułem, prosimy o kontakt mailowy pod adresem szkopul@fri.edu.pl.
Jeśli chciałbyś porozmawiać o zadaniach, rozwiązaniach lub problemach technicznych, odwiedź nasze serwery na Discordzie. Są one moderowane przez społeczność, ale członkowie zespołu wsparcia również aktywnie się tam udzielają.